package com.example.demospringmybatisplus.handler;

/**
 * 数据校验抽象处理器
 *
 * @author huahua
 * @DATE 2024/8/9
 **/
public abstract class ValidateHandler<T> {

    private ValidateHandler<T> next;

    public void setNext(ValidateHandler<T> next) {
        this.next = next;
    }

    public abstract void doValidate(T validateData);

    public void next(T validateData) {
        if (next == null) {
            return;
        }
        next.doValidate(validateData);
    }
}
